//
//  ATFiveViewController.m
//  TAUi
//
//  Created by Lin Buken on 16/1/11.
//  Copyright © 2016年 com.aiton. All rights reserved.
//

#import "ATFiveViewController.h"

#define theWidth [UIScreen mainScreen].bounds.size.width
#define k 138


@interface ATFiveViewController ()

@end

@implementation ATFiveViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.

    self.edgesForExtendedLayout = UIRectEdgeTop;
    UIScrollView *theScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 448, theWidth, 138)];
    theScrollView.backgroundColor = [UIColor orangeColor];
    
    theScrollView.tag = 101;
    //    是否可以反弹
    theScrollView.bounces = NO;
    //    是否可以滚动
    //    theScrollView.scrollEnabled = NO;
    
    //    是否可以分页
    //    theScrollView.pagingEnabled  = YES;
    
    //    设置是否需要Indicator
    theScrollView.showsHorizontalScrollIndicator = NO;
    theScrollView.showsVerticalScrollIndicator = NO;
    //    theScrollView.alwaysBounceHorizontal  = YES;
    //    theScrollView.alwaysBounceVertical = YES;
    
    //    设置indicator风格
    //    theScrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
    //    设置内容大小 contentSize
    theScrollView.contentSize = CGSizeMake(8*k, k);
    //    设置偏移量
    //    theScrollView.contentOffset
    
    //    设置内容的边缘（扩展的大小）
    //    theScrollView.contentInset = UIEdgeInsetsMake(0, 50, 0, 0);
    //    theScrollView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 50, 0, 0);
    
    
    //    提示用户   flash indicator
    //    [theScrollView flashScrollIndicators];
    
    //    是否同时运动  Lock
    theScrollView.directionalLockEnabled = YES;
    
    UIImageView *image1 = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 138, 138)];
    image1.image = [UIImage imageNamed:@"IMG01"];
    [theScrollView addSubview:image1];
    
    UIImageView *image2 = [[UIImageView alloc] initWithFrame:CGRectMake(k, 0, 138, 138)];
    image2.image = [UIImage imageNamed:@"IMG02"];
    [theScrollView addSubview:image2];
    
//    UIImageView *image3 = [[UIImageView alloc] initWithFrame:CGRectMake(2*k, 0, 138, 138)];
//    image3.image = [UIImage imageNamed:@"IMG03"];
//    [theScrollView addSubview:image3];
//    
//    UIImageView *image4 = [[UIImageView alloc] initWithFrame:CGRectMake(3*k, 0, 138, 138)];
//    image4.image = [UIImage imageNamed:@"IMG04"];
//    [theScrollView addSubview:image4];
//    
//    UIImageView *image5 = [[UIImageView alloc] initWithFrame:CGRectMake(4*k, 0, 138, 138)];
//    image5.image = [UIImage imageNamed:@"IMG05"];
//    [theScrollView addSubview:image5];
//    
//    UIImageView *image6 = [[UIImageView alloc] initWithFrame:CGRectMake(5*k, 0, 138, 138)];
//    image6.image = [UIImage imageNamed:@"IMG06"];
//    [theScrollView addSubview:image6];
//    
//    UIImageView *image7 = [[UIImageView alloc] initWithFrame:CGRectMake(6*k, 0, 138, 138)];
//    image7.image = [UIImage imageNamed:@"IMG06"];
//    [theScrollView addSubview:image7];
//    
//    UIImageView *image8 = [[UIImageView alloc] initWithFrame:CGRectMake(7*k, 0, 138, 138)];
//    image8.image = [UIImage imageNamed:@"IMG06"];
//    [theScrollView addSubview:image8];
    
    [self.view addSubview:theScrollView];
    






}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
